#!/bin/bash

# mirrorlist
sed -i 's|^\( *Server = \).*http://mirror\.archlinuxarm\.org.*|\1https://mirrors.tuna.tsinghua.edu.cn/archlinuxarm/$arch/$repo|g' /etc/pacman.d/mirrorlist

# parted
pacman -Syy && pacman -S parted --noconfirm
bash -c "$(curl -fsSL https://gitee.com/hevey88/install_script/raw/main/archlinux_parted.sh)"

pacstrap -K /mnt linux base base-devel neovim networkmanager bash-completion openssh archlinuxarm-keyring
genfstab -U /mnt >/mnt/etc/fstab
arch-chroot /mnt

# bash -c "$(curl -fsSL https://gitee.com/hevey88/install_script/raw/main/arch_before_chroot.sh)"
